<div id="maincontent">

<%= render :partial => "shared_common_files/data_area_help_bar" %>

<h2>Feed > New/Save</h2>
<!-- h2>Create new feed</h2 -->
<!-- h5>You can create new feed and save it to your list</h5 -->	
<!-- hr -->


  
    <% for name in [:notice, :warning, :message] %>
    <% if flash[name] %>
      <%= "<div class='message-fatal'> #{flash[name]} </div>" %>
    <% end %>
  <% end %>
  
<%= start_form_tag( {:action => 'newfeed'}, {:class => 'appform'}) %>
     
     <fieldset>
    	      
    	    <h3>Create New Feed</h3>
    	      	    
    	    <label for="name"><b>Feed Url :</b>
			<input class="f-name" name="feedurl" value="<%=@feedurl%>" size="30" style="width: 45em;"/><br />
			</label>
			
			
    	    
    	    <!-- <input name="newfeed" value="<%=@newOrRefreshFeedLabel%>" type="submit" /> -->
    	    
    	    
    	    <div class="f-submit-wrap">
	    	    <%= image_submit_tag "/themes/odotclassic/images/#{@newOrRefreshFeedLabel}", :border => 0 %>
	    	    <%= link_if_authorized image_tag('/themes/odotclassic/images/btn_cancel.gif' ,:alt => 'Cancel'), {:action => 'list'}  %>
    	    </div>


    		 <% if(@refreshfeedflag=='true')%>
        	     <%= hidden_field_tag "op", "refresh"%>
        	 <%end%>
        	 
     </fieldset>   
     	 						    
<%= end_form_tag %>
 

<% if(@h!=nil)%>
    <%  @feedu = @h['feedobj']
    	@error_string = @h['errorstr']
    	
    if @error_string==nil
    %>

  
<% if (@feedu!=nil) %>
<!--%= start_form_tag :action => 'savefeed' %-->
<%= start_form_tag( {:action => 'savefeed'}, {:class => 'appform'}) %>
	
	<fieldset>
			
			 <h3>Save Feed</h3>

		     <label for="name"><b>Feed Title:</b> 
		     	<%= @feedu.title%><%= hidden_field_tag "feedtitle", @feedu.title%>
		     </label>
		     
		     <label for="name"><b>Feed Description:</b>
		     	<%= @feedu.description%>
		     	<%= hidden_field_tag "feeddescription", @feedu.description%>
		      	<%= hidden_field_tag "feedurl", @feedurl%>
		      	<%= hidden_field_tag "feedguid", @feedu.id%>
		      	<%= hidden_field_tag "feedupdated", @feedu.updated%>
             </label>
		     
		     <div class="f-submit-wrap">
		     	 <%= image_submit_tag "/themes/odotclassic/images/btn_svfeed.gif", :border => 0 %>
		     	 <%= link_if_authorized image_tag('/themes/odotclassic/images/btn_cancel.gif' , :alt=> 'Cancel'), {:action => 'newfeed'}  %>
		     </div>
		     
	</fieldset>
	
<%= end_form_tag %>
<%end%>
<%else%>
  <div class="message-information">
    <ul>
        <font color="red">Application could not connect to the internet. following are the few reasons</font>
    	<li>You are not connected to the internet.</li>
    	<li>You are running Ajuby toolkit behind the proxy server.</li>
    	<h5>System error: <%=@error_string%> </h5>
    </ul>
 </div>
   
<%end%>
<%end%>
 </div>
